

/*
This do-file reproduces Table A2 of the paper "Dismantling the \Jungle":
Migrant Relocation and Extreme Voting in France", by P. Vertier, M. Viskanic, and M. Gamalerio

*/

log using "Table A2", replace text

clear

use "Table A2 dataset.dta"

**************
***Table A2***
**************

preserve
keep if reg==94
reg  evol2_fn_2012_2017  num_group_vv   , cluster( numdep)

qui outreg2 using "Table A2", ///
keep(num_group_vv) ctitle(no controls) bdec(3) nocons excel tex `append'


reg  evol2_fn_2012_2017  num_group_vv       coastal  log_hotel_rooms    log_tot_pop delta_log_tot_pop    share_0014   share_60p  delta_share_0014    delta_share_60p  ///
   share_csp1 share_csp2 share_csp3 share_csp4 share_csp5 share_csp6 share_csp7 share_csp8   delta_share_csp* share_chom1564 delta_share_chom1564 migshare delta_migshare  ///
   log_median_inc delta_log_median_in  , cluster( numdep)

qui outreg2 using "Table A2", ///
keep(num_group_vv) ctitle(controls) bdec(3) nocons excel tex `append'

restore


*************
***P-value***
*************

/*
N.B.

The code below estimates the p-value reported in Table A2 of the paper using the command suest.

The code may give errors occasionally and not produce any result. If this happens, it is necessary to rerun the code until it does not give error
and produce the result reproduced in the paper.

*/


reg  evol2_fn_2012_2017  num_group_vv       coastal  log_hotel_rooms    log_tot_pop_ delta_log_tot_pop    share_0014_   share_60p_  delta_share_0014    delta_share_60p  ///
   share_csp1_ share_csp2_ share_csp3_ share_csp4_ share_csp5_ share_csp6_ share_csp7_ share_csp8_   delta_share_csp* share_chom1564_ delta_share_chom1564 migshare_ delta_migshare  ///
   log_median_inc_ delta_log_median_in    if reg==94

estimates store cors

reg  evol2_fn_2012_2017  num_group_vv       coastal  log_hotel_rooms    log_tot_pop_ delta_log_tot_pop  log_min_dist_center volontaires_migrants evol_CADA_2012_2016 share_0014_   share_60p_  delta_share_0014 ///
   delta_share_60p   share_csp1_ share_csp2_ share_csp3_ share_csp4_ share_csp5_ share_csp6_ share_csp7_ share_csp8_   delta_share_csp* share_chom1564_ delta_share_chom1564 migshare_ delta_migshare ///
   log_median_inc_ delta_log_median_in female_ age_ right_ CSP_agri_ CSP_ind_ CSP_sal_ CSP_lib_ CSP_ens_ CSP_func_ CSP_div_ CSP_retr_ i.reg  if reg!=94
   
estimates store big

suest cors big,  vce(cluster numdep)

test [cors_mean]num_group_vv-[big_mean]num_group_vv = 0


log close















